import request from '@/utils/request'

// 查询请购单明细列表
export function listItem(query) {
  return request({
    url: '/buy/buyRequestbuyBillItem/list',
    method: 'get',
    params: query
  })
}

// 查询请购单明细详细
export function getItem(id) {
  return request({
    url: '/buy/buyRequestbuyBillItem/' + id,
    method: 'get'
  })
}

// 新增请购单明细
export function addItem(data) {
  return request({
    url: '/buy/buyRequestbuyBillItem',
    method: 'post',
    data: data
  })
}

// 修改请购单明细
export function updateItem(data) {
  return request({
    url: '/buy/buyRequestbuyBillItem',
    method: 'put',
    data: data
  })
}

// 删除请购单明细
export function delItem(id) {
  return request({
    url: '/buy/buyRequestbuyBillItem/' + id,
    method: 'delete'
  })
}


// 查询请购单明细列表
export function list(query) {
  return request({
    url: '/buy/buy0009/list',
    method: 'get',
    params: query
  })
}

// 查询请购单明细列表
export function handleToInv(data) {
  return request({
    url: '/buy/buy0009/handleToInv',
    method: 'post',
    data: data
  })
}

// 查询请购单明细列表
export function insertBuyPurchaseBill(data) {
  return request({
    url: '/buy/buy0009/insertBuyPurchaseBill',
    method: 'post',
    data: data
  })
}

// 查询请购单明细列表
export function getContracts() {
  return request({
    url: '/buy/buy0009/getContracts',
    method: 'get',

  })
}

// 查询请购单明细详细
export function getContractInfo(vBillNo) {
  return request({
    url: '/buy/buy0009/' + vBillNo,
    method: 'get'
  })
}

// 查询请购单明细列表
export function updateBuyPurchaseBill(data) {
  return request({
    url: '/buy/buy0009/updateBuyPurchaseBill',
    method: 'post',
    data: data
  })
}
